package com.itheima.domain;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class User implements Serializable {

    private Date birthday;

    private Integer gender;

    private String password;

    private String realName;

    private String userName;

    private Integer uuid;

    public User() {
    }

    public User(Date birthday, Integer gender, String password, String realName, String userName, Integer uuid) {
        this.birthday = birthday;
        this.gender = gender;
        this.password = password;
        this.realName = realName;
        this.userName = userName;
        this.uuid = uuid;
    }

    public String getBirthday() {
        //一般不写注释，在getBirthday()中，采用下方格式，并返回String类型即可
        return new SimpleDateFormat("yyyy-MM-dd").format(birthday);

    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getUuid() {
        return uuid;
    }

    public void setUuid(Integer uuid) {
        this.uuid = uuid;
    }

    @Override
    public String toString() {
        return "User{" +
                "birthday=" + birthday +
                ", gender=" + gender +
                ", password='" + password + '\'' +
                ", realName='" + realName + '\'' +
                ", userName='" + userName + '\'' +
                ", uuid=" + uuid +
                '}';
    }
}
